package com.example.demo.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Created by zwt on 2018/7/30.
 */
@Controller
public class TestController {

    @Value("${server.port}")
    String port;

    @RequestMapping("hi")
    @ResponseBody
    public String test(String name){
        return "hi " + name + " ,i am from port:" + port;
    }
}
